#ifndef ONEVIDEOINFO_H
#define ONEVIDEOINFO_H

#include <QWidget>

namespace Ui {
class onevideoinfo;
}

class onevideoinfo : public QWidget
{
    Q_OBJECT
    struct oneevaluate{
        QString time;
        QString content_type;
        QString content;
        QString name;
        QString image;
        bool istalk=false;   //是否为小弹幕
        QString position;
    };
public:
    int videoid;
    int favornum=0;
    int coinnum=0;
    int storagenum=0;
    int playnum=0;
    int udpsocket;
    QString author;
    QString sign;
    QString image;
    QString videolength;
    int evaluatenum=0;
    QString issuetime;
    QString videoaddress;
    bool displayvideolength=true;
    bool ishistory=false;
    bool isown=false;
    QString position;
    QString authorimage;
    QVector<oneevaluate*> evaluates;
public:
    void addoneevaluate(QString time,QString content_type,QString content,QString name,QString image,int istalk,QString position="");
    void initUi();
    // void initdata(int id,int fm,int cm,int sm,QString image,QString sign,QString vd,QString author,QString length,QString issuetime,QString ai,QString playnum);
    void renewwatchposition(QString position);
    void sethistoryattribute();
    void duplicateone(onevideoinfo* one);
public:
    explicit onevideoinfo(QWidget *parent = nullptr);
    ~onevideoinfo();
private:
    Ui::onevideoinfo *ui;
};

#endif // ONEVIDEOINFO_H
